<template>
  <div id='userLayout' :class="['user-layout-wrapper', device]">
    <div class='container'>
      <div class='contentBox'>
        <div class='leftContent'>
          <route-view></route-view>
        </div>
        <div class='rightContent'>
          <!-- <img src='@/assets/login.gif' class='rightImg' /> -->
          <!-- <div class='bottomBanner'></div> -->
          <img src='@/assets/login.png' class='rightImg' />
        </div>
      </div>

      <div class='footer'>
        <!--        <div class="links">-->
        <!--          <a href="http://doc.jeecg.com" target="_blank">帮助</a>-->
        <!--          <a href="https://github.com/zhangdaiscott/jeecg-boot" target="_blank">隐私</a>-->
        <!--          <a href="https://github.com/zhangdaiscott/jeecg-boot/blob/master/LICENSE" target="_blank">条款</a>-->
        <!--        </div>-->
        <!--        <div class='copyright'>-->
        <!--          Copyright &copy; 2023 <a href='http://casugn.com' target='_blank'></a> 出品-->
        <!--        </div>-->
      </div>
    </div>
  </div>
</template>

<script>
import RouteView from '@/components/layouts/RouteView'
import { mixinDevice } from '@/utils/mixin.js'

export default {
  name: 'UserLayout',
  components: { RouteView },
  mixins: [mixinDevice],
  data() {
    return {}
  },
  mounted() {
    document.body.classList.add('userLayout')
  },
  beforeDestroy() {
    document.body.classList.remove('userLayout')
  }
}
</script>

<style lang='less' scoped>
#userLayout.user-layout-wrapper {
  width: 100%;
  height: 100%;

  &.mobile {
    .container {
      .main {
        max-width: 368px;
        width: 98%;
      }
    }
  }

  .container {
    width: 100%;
    min-height: 100%;
    background-color: fade(@primary-color, 70%);
    padding: 110px 0 144px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;

    .contentBox {
      display: flex;
      align-items: center;

      .leftContent {
        // width: 600px;
        // height: 800px;
        width: 540px;
        height: 608px;
        background: #ffffff;
        border-radius: 10px 0px 0px 10px;

        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
      }

      .rightContent {
        // width: 900px;
        // height: 800px;
        width: 540px;
        height: 608px;
        background: #fff;
        border-radius: 0px 10px 10px 0px;
        overflow: hidden;
        position: relative;

        .rightImg {
          width: 100%;
          height: 100%;
          position: relative;
          z-index: 2;
        }

        .bottomBanner {
          width: 100%;
          height: 370px;
          background: rgba(150, 195, 255, 0.8);
          border-radius: 80px 80px 0 0;
          position: absolute;
          bottom: 0;
        }
      }
    }

    .main {
      // min-width: 260px;
      // width: 368px;
      // margin: 167px auto 0;

      width: 421px;
      margin: 0;
    }

    .footer {
      position: absolute;
      width: 100%;
      bottom: 0;
      padding: 0 16px;
      margin: 48px 0 24px;
      text-align: center;

      .links {
        margin-bottom: 8px;
        font-size: 14px;

        a {
          color: rgba(0, 0, 0, 0.45);
          transition: all 0.3s;

          &:not(:last-child) {
            margin-right: 40px;
          }
        }
      }

      .copyright {
        color: rgba(0, 0, 0, 0.45);
        font-size: 14px;
      }
    }
  }
}
</style>